﻿using MusicExplorer.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;

namespace MusicExplorer.Converters
{
    public sealed class TrackTypeToWebViewVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            switch((TrackType)value)
            {
                case TrackType.Soundcloud:
                case TrackType.Classic:
                    return Visibility.Collapsed;
                case TrackType.Youtube:
                    return Visibility.Visible;
                default:
                    throw new Exception("Not supported track type");
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, string language)
        {
            throw new NotImplementedException();
        }
    }
}
